<script setup>
import { useGmap } from "@/hooks/useMap.js";
import config from "@/config/index.js";
import { onMounted, ref, unref } from "vue";

const mapsEle = ref()

onMounted(() => {
  const { gmap, initMap, initMapEvent } = useGmap(unref(mapsEle), config.map);
  initMap().then(() => {
    initMapEvent()
  });
});
</script>

<template>
  <div class="map" ref='mapsEle'>
  </div>
</template>

<style scoped>
.map {
  position: relative;
  height: 100%;
  width: 100%;
}
</style>
